<template>
	<view class="content">
		 <u-parse :content="data.content" @preview="preview" @navigate="navigate" />
	</view>
</template>

<script>
	import {
        mapState,
        mapMutations
    } from 'vuex'
	import uParse from '@/components/gaoyia-parse/parse.vue'
	
	export default {
		components: {
			uParse
		},
		data() {
			return {
				data: {
					"content": " "
				},
				id:5
			}
		},
		onLoad(e) {
			if(e.id){
				this.id = 6
				uni.setNavigationBarTitle({
					title: '申请范例'
				});
			}
			this.getAbout()
		},
		methods: {
			...mapMutations(['getNetworkType','vuexRequest']),
			preview(src, e) {
			  console.log(src)
			},
			navigate(href, e) {
				console.log(href)
			  // do something
			},
			getAbout() {
				this.vuexRequest({
					url: '/api/addons/execute?route=article-single/view&addon=rf-article',
					method: 'GET',
					data: {id: this.id},
					success: (res)  => {
							
						this.data = res.data.data
					},
					fail: (err)  => {
						
					},
				})
			}
		}
	}
</script>

<style>
	.content{
		padding: 20upx;
	}
</style>
